package lab2.demo;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.core.env.Environment;

@EnableConfigurationProperties(CustomProperties.class)

public class AutoConfig {
    @Bean
    @ConditionalOnProperty(prefix="qqq",name="enable",havingValue = "true")
    CommandLineRunner commandLineRunner(Environment a)
    {
        return new Customerrunner(a);
    }
}
